home *** CD-ROM | disk | FTP | other *** search
- Path: Milpitas01.pop.internex.net!art90
- From: Artyom@kansmen.com (Art Shelest)
- Newsgroups: comp.lang.c++
- Subject: Re: newing char**
- Date: Sun, 11 Feb 96 00:43:00 GMT
- Organization: Kansmen Corp.
- Message-ID: <4fje7o$dl2@Milpitas01.Pop.Internex.NET>
- References: <4fggal$4pf@darkstar.UCSC.EDU>
- NNTP-Posting-Host: 205.158.201.203
- X-Newsreader: News Xpress Version 1.0 Beta #3
-
- In article <4fggal$4pf@darkstar.UCSC.EDU>,
- jono@cse.ucsc.edu (Jonathan Gibbs) wrote:
- >If I have the following declaration:
- >
- >char **name;
- >
- >The following line compiles fine with g++, but I get the following
- >error on SGI's CC. Which is right?
- >
- >int num;
- >name = new (char*)[num];
- >for (int i=0; i < num; i++) {
- > name = new char[25];
- >} ^^^^^^^
-
- Maybe you meant name[i] = ...
-
- _Art.
-